package com.example.mapper;

import com.example.pojo.Swiper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;

@Mapper
public interface SwiperMapper {

    // 查询启用的轮播图，按sort升序（数字越小越靠前），取前5条
    @Select("select id, name, src, remark from swiper where is_valid = 1 order by sort asc limit 5")
    List<Swiper> selectValidSwiper();
}